Conversation
…queryKey()' utility
📝 WalkthroughWalkthroughUpdates test files in the angular-query-experimental package to replace hard-coded query and mutation key literals with dynamically generated keys using the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit a586d79
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts (1)
600-640: Minor: Unnecessary blank line at line 601.There's an extra blank line after the key declaration that creates inconsistency with other test patterns in this file.
Suggested fix
const key = queryKey() - const mutation1 = TestBed.runInInjectionContext(() =>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts` around lines 600 - 640, Remove the unnecessary blank line after the const key = queryKey() declaration in the inject-mutation.test.ts snippet so it matches the file's test formatting; this affects the block that creates mutation1 and mutation2 via TestBed.runInInjectionContext(() => injectMutation(...))—keep the key declaration immediately followed by the mutation1 creation to maintain consistency with other tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts`:
- Around line 600-640: Remove the unnecessary blank line after the const key =
queryKey() declaration in the inject-mutation.test.ts snippet so it matches the
file's test formatting; this affects the block that creates mutation1 and
mutation2 via TestBed.runInInjectionContext(() => injectMutation(...))—keep the
key declaration immediately followed by the mutation1 creation to maintain
consistency with other tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 787c35dc-457d-4d23-8b07-da12efc14a61
📒 Files selected for processing (15)
packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.tspackages/angular-query-experimental/src/__tests__/infinite-query-options.test.tspackages/angular-query-experimental/src/__tests__/inject-infinite-query.test-d.tspackages/angular-query-experimental/src/__tests__/inject-infinite-query.test.tspackages/angular-query-experimental/src/__tests__/inject-is-fetching.test.tspackages/angular-query-experimental/src/__tests__/inject-is-mutating.test.tspackages/angular-query-experimental/src/__tests__/inject-mutation-state.test.tspackages/angular-query-experimental/src/__tests__/inject-mutation.test.tspackages/angular-query-experimental/src/__tests__/inject-queries.test-d.tspackages/angular-query-experimental/src/__tests__/inject-query.test-d.tspackages/angular-query-experimental/src/__tests__/inject-query.test.tspackages/angular-query-experimental/src/__tests__/mutation-options.test-d.tspackages/angular-query-experimental/src/__tests__/mutation-options.test.tspackages/angular-query-experimental/src/__tests__/pending-tasks.test.tspackages/angular-query-experimental/src/__tests__/query-options.test-d.ts
🎯 Changes
queryKey()utility from@tanstack/query-test-utilsacross angular-query-experimental test files.test.ts) and type tests (.test-d.ts)inject-query.test.ts,inject-query.test-d.ts,inject-mutation.test.ts,inject-mutation-state.test.ts,inject-infinite-query.test.ts,inject-infinite-query.test-d.ts,inject-is-fetching.test.ts,inject-is-mutating.test.ts,inject-queries.test-d.ts,query-options.test-d.ts,infinite-query-options.test.ts,infinite-query-options.test-d.ts,mutation-options.test.ts,mutation-options.test-d.ts,pending-tasks.test.ts✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit